<html>
<head>
<meta http-equiv=Content-Type content=text/html;charset=utf-8>
<#include "../inc/commonJs.html">
<script type="text/JavaScript">
	function doSave(obj){
		var url = "saveClass.do";
		$('form').form('submit',{  
		    url:url,
		    onSubmit:function(){
				return $(this).form('validate')
		    },  
		    success:function(data){
		    	obj.tree('reload');
				top.closemodalwindow(true,data);
		    }  
		});
	}
	//
	$(function(){
		var url = window.location.href;
		if(url.indexOf('windowparam')!=-1){
			var params = url.substring(url.lastIndexOf('windowparam')+12,url.length);
			if(params!=''&&params!=0){
				$('#fid').combobox('setValue',params);
			}
		}else{
			if('${obj.fid!}'!=0){
				$('#fid').combobox('setValue','${obj.fid!}');
			}
			$('#zt').val('${obj.zt!1}');
		}
	});
</script>

</head>
<body>
<table align="center" cellspacing="0" class="table_all" width="90%">
<form align="center" method="post">
    <input type="hidden" id="zt" name="zt" value="1"/>
    <input type="hidden" id="id" name="id" value="${obj.id!0}"/>
      <tr>
        <td height="25" class="td_table_1">上级分类：</td>
        <td height="25" class="td_table_2">&nbsp;
        	<input id="fid" class="easyui-combobox" name="fid" style="width:150px;" data-options="valueField:'id',textField:'name',url:'listClassForCombox.do',panelHeight:'100'"/>
         </td>
      </tr>
      <tr>
        <td height="25" class="td_table_1" valign="middle"><span class="smallFont">分类名称：</span></td>
        <td height="25" class="td_table_2"><div align="left">&nbsp;
            <input name="name" class="easyui-validatebox" required="true" maxlength="20" style="width:150px;"  value="${obj.name!}">
            <font color=red>*</font> </div></td>
      </tr>
      <tr>
        <td height="25" class="td_table_1" valign="middle"><span class="smallFont">排序：</span></td>
        <td height="25" class="td_table_2"><div align="left">&nbsp;
            <input name="orders" class="easyui-validatebox" required="true" maxlength="20" style="width:150px;"  value="${obj.orders!0}">
            <font color=red>*</font> </div></td>
      </tr>
</form>
</table>
</body>
</html>